<template>
	<view class="top-tabbar">
		<view class="top-tabbar__content">
			<view class="top-tabbar__item" @click="$emit('change', 2)">
				<text class="top-tabbar__text">商家详情</text>
			</view>
			<view class="top-tabbar__item" :data-url="`/pages/shop/prolist?bid=${business.id}`" @click="goto">
				<text class="top-tabbar__text">商品</text>
			</view>
			<view class="top-tabbar__item" :data-url="`/activity/seckill/index?bid=${business.id}`" @click="goto">
				<text class="top-tabbar__text">促销</text>
			</view>
			<view class="top-tabbar__item" :data-url="`/activity/shortvideo/index_old?bid=${business.id}`" @click="goto">
				<text class="top-tabbar__text">视频</text>
			</view>
			<view class="top-tabbar__item" :data-url="`/pages/article/artlist?bid=${business.id}`" @click="goto">
				<text class="top-tabbar__text">资讯</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			business: Object
		}
	}
</script>

<style lang="scss" scoped>
	.top-tabbar {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		z-index: 999;
		&__content {
			display: flex;
			height: 80rpx;
			padding: 0 24rpx;
			background-color: rgba(0, 0, 0, 0.05);
		}
		&__item {
			flex: 1; display: flex; align-items: center; justify-content: center;
		}
		&__text {
			font-size: 28rpx;
			color: #fff;
			font-weight: bold;
		}
	}
</style>